function [Mdl, score] = trainLR(pred, resp)

% fitting a logistic regression model
Mdl = fitglm(pred,resp,'Distribution','binomial','Link','logit');

% Probability estimates from the logistic regression model as scores.
score = Mdl.Fitted.Probability;

end